@if(config('settings.module.site_change') && $role = Admin::user()->role_type)
    <li class="dropdown" id="change-site001">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <i class="fa fa-exchange"></i>
            <span class="hidden-xs">切换角色</span>
        </a>
        <ul class="dropdown-menu">
            @if($type)
                <li><a href="{{admin_url('auth/login').'?site=0'}}" no-pjax>职工端</a></li>
            @elseif(in_array($role,[1,2]))
                <li>
                    <a href="{{admin_url('auth/login').'?site='.$role}}" no-pjax>{{data_get([1=>'管理端',2=>'科室端'],$role)}}</a>
                </li>
            @endif
        </ul>
    </li>
    <style>
        #change-site001 ul {
            width: 140px;
            min-width: 140px;
            border: 1px solid #d5d9e8;
        }

        #change-site001 ul li a {
            padding: 6px 20px;
        }
    </style>
@endif
